<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>js练习</title>
    <script src="./js/jquery-3.7.1.min.js"></script>
</head>
<body>
    <!-- <div id="div1"><span>我是一个span</span></div>
    <input type="text" id=text1 value="text">
    <input type="button" id="text2" value="点击修改属性">
    <script>
        // let context = $("#div1").text();
        // console.log(context);
        // context = $("#div1").html();
        // console.log(context);
        $("#text2").click(function(){
            // $("#div1").text("<h1>我是一级标题</h1>")
            $("#div1").html("<h1>我是一级标题</h1>")
            $("#text1").val("aaa");
        });
    </script> -->

    <p><a href="https://www.bitejiuyeke.com/index" id="bite">比特就业课</a></p>
    <img src="../pic/cat.jpg" width="200px">
    <input type="button" id="button" value="点击修改属性">
    <script>
        // let l1 = $("p a").attr("href");
        // console.log(l1);
        // let l2 = $("img").attr("src")
        // console.log(l2);
        $("#button").click(function() {
            $("p a").attr("href", "https://www.baidu.com/");
            // $("img").attr("src", "../pic/pig.jpg");
            $("img").attr("width", "300px");
        });
    </script>
</body>
</html>